<?php
$routerGroup = new \Phalcon\Mvc\Router\Group(['module' => 'backstage']);

$routerGroup -> setPrefix('/backstage');

$routerGroup -> addGet('(/?)', ['controller'=>'Index','action'=>'index']) -> setName('BackstageIndex::index');

$routerGroup -> addPost('/auth/login', ['controller'=>'Auth','action'=>'index']) -> setName('BackstageAuth::index');

$routerGroup -> addGet('/user', ['controller'=>'User','action'=>'index']) -> setName('BackstageUser::index');

$routerGroup -> addGet('/user/order', ['controller'=>'UserOrder','action'=>'pager']) -> setName('BackstageUserOrder::pager');
$routerGroup -> addPut('/user/order/status', ['controller'=>'UserOrder','action'=>'status']) -> setName('BackstageUserOrder::status');

$routerGroup -> addGet('/user/wallet/transfer/log', ['controller'=>'UserWalletTransfer','action'=>'log']) -> setName('UserWalletTransfer::log');

$routerGroup -> addGet('/account', ['controller'=>'Account','action'=>'index']) -> setName('BackstageAccount::index');
$routerGroup -> addGet('/account/:int', ['controller'=>'Account','action'=>'findFirstById','id'=>1]) -> setName('BackstageAccount::findFirstById');
$routerGroup -> addPost('/account', ['controller'=>'Account','action'=>'create']) -> setName('BackstageAccount::create');
$routerGroup -> addPut('/account/:int', ['controller'=>'Account','action'=>'update','id'=>1]) -> setName('BackstageAccount::update');
$routerGroup -> addDelete('/account/:int', ['controller'=>'Account','action'=>'delete','id'=>1]) -> setName('BackstageAccount::delete');

$routerGroup -> addGet('/account/roles', ['controller'=>'AccountRoles','action'=>'index']) -> setName('BackstageAccountRoles::index');
$routerGroup -> addPost('/account/roles', ['controller'=>'AccountRoles','action'=>'create']) -> setName('BackstageAccountRoles::create');
$routerGroup -> addDelete('/account/roles/:int', ['controller'=>'AccountRoles','action'=>'delete','id'=>1]) -> setName('BackstageAccountRoles::delete');

$routerGroup -> addGet('/account/roles/:int/resources', ['controller'=>'AccountRoles','action'=>'resources','id'=>1]) -> setName('BackstageAccountRoles::resources');
$routerGroup -> addPut('/account/roles/:int/resources', ['controller'=>'AccountRoles','action'=>'updateResources','id'=>1]) -> setName('BackstageAccountRoles::updateResources');
$routerGroup -> addPut('/account/roles/:int/resources/:int', ['controller'=>'AccountRoles','action'=>'updateResourcesAccess','id'=>1,'resources_id'=>2]) -> setName('BackstageAccountRoles::updateResourcesAccess');

$routerGroup -> addGet('/Config/index', ['controller'=>'Config','action'=>'index']) -> setName('BackstageConfig::index');

$routerGroup -> addGet('/trade/buy', ['controller'=>'TradeBuy','action'=>'index']) -> setName('BackstageTradeBuy::index');
$routerGroup -> addGet('/trade/buy/:int', ['controller'=>'TradeBuy','action'=>'findFirstById','id'=>1]) -> setName('BackstageTradeBuy::findFirstById');
$routerGroup -> addGet('/trade/buy/:int/match', ['controller'=>'TradeBuy','action'=>'matchIndex','id'=>1]) -> setName('BackstageTradeBuy::matchIndex');
$routerGroup -> addPost('/trade/buy/:int/match', ['controller'=>'TradeBuy','action'=>'match','id'=>1]) -> setName('BackstageTradeBuy::match');
$routerGroup -> addPut('/trade/buy/:int/cancal', ['controller'=>'TradeBuy','action'=>'cancal','id'=>1]) -> setName('BackstageTradeBuy::cancal');
$routerGroup -> addPut('/trade/buy/:int/cancal0', ['controller'=>'TradeBuy','action'=>'cancal0','id'=>1]) -> setName('BackstageTradeBuy::cancal0');

$routerGroup -> addGet('/trade/sell', ['controller'=>'TradeSell','action'=>'index']) -> setName('BackstageTradeSell::index');
$routerGroup -> addGet('/trade/sell/:int/match', ['controller'=>'TradeSell','action'=>'matchIndex','id'=>1]) -> setName('BackstageTradeSell::matchIndex');
$routerGroup -> addPost('/trade/sell/:int/match', ['controller'=>'TradeSell','action'=>'match','id'=>1]) -> setName('BackstageTradeSell::match');
$routerGroup -> addPut('/trade/sell/:int/cancal', ['controller'=>'TradeSell','action'=>'cancal','id'=>1]) -> setName('BackstageTradeSell::cancal');
$routerGroup -> addPut('/trade/sell/:int/cancal0', ['controller'=>'TradeSell','action'=>'cancal0','id'=>1]) -> setName('BackstageTradeSell::cancal0');

$routerGroup -> addGet('/trade/business/buy', ['controller'=>'TradeBusinessBuy','action'=>'index']) -> setName('BackstageTradeBusinessBuy::index');
$routerGroup -> addGet('/trade/business/buy/:int/match', ['controller'=>'TradeBusinessBuy','action'=>'matchIndex','id'=>1]) -> setName('BackstageTradeBusinessBuy::matchIndex');
$routerGroup -> addPost('/trade/business/buy/:int/match', ['controller'=>'TradeBusinessBuy','action'=>'match','id'=>1]) -> setName('BackstageTradeBusinessBuy::match');

$routerGroup -> addGet('/trade/business/sell', ['controller'=>'TradeBusinessSell','action'=>'index']) -> setName('BackstageTradeBusinessSell::index');
$routerGroup -> addGet('/trade/business/sell/:int', ['controller'=>'TradeBusinessSell','action'=>'findFirstById','id'=>1]) -> setName('BackstageTradeBusinessSell::findFirstById');
$routerGroup -> addGet('/trade/business/sell/:int/match', ['controller'=>'TradeBusinessSell','action'=>'matchIndex','id'=>1]) -> setName('BackstageTradeBusinessSell::matchIndex');
$routerGroup -> addPost('/trade/business/sell/:int/match', ['controller'=>'TradeBusinessSell','action'=>'match','id'=>1]) -> setName('BackstageTradeBusinessSell::match');
$routerGroup -> addPut('/trade/business/sell/:int/cancal', ['controller'=>'TradeBusinessSell','action'=>'cancal','id'=>1]) -> setName('BackstageTradeBusinessSell::cancal');
$routerGroup -> addPut('/trade/business/sell/:int/cancal0', ['controller'=>'TradeBusinessSell','action'=>'cancal0','id'=>1]) -> setName('BackstageTradeBusinessSell::cancal0');

$routerGroup -> addGet('/notice', ['controller'=>'Notice','action'=>'index']) -> setName('BackstageNotice::index');
$routerGroup -> addGet('/notice/:int', ['controller'=>'Notice','action'=>'findFirstById','id'=>1]) -> setName('BackstageNotice::findFirstById');
$routerGroup -> addPost('/notice', ['controller'=>'Notice','action'=>'create']) -> setName('BackstageNotice::create');
$routerGroup -> addPut('/notice/:int', ['controller'=>'Notice','action'=>'update','id'=>1]) -> setName('BackstageNotice::update');
$routerGroup -> addDelete('/notice/:int', ['controller'=>'Notice','action'=>'delete','id'=>1]) -> setName('BackstageNotice::delete');

$routerGroup -> addGet('/swipe', ['controller'=>'Swipe','action'=>'index']) -> setName('BackstageSwipe::index');
$routerGroup -> addPost('/swipe', ['controller'=>'Swipe','action'=>'create']) -> setName('BackstageSwipe::create');
$routerGroup -> addDelete('/swipe/:int', ['controller'=>'Swipe','action'=>'delete','id'=>1]) -> setName('BackstageSwipe::delete');

$routerGroup -> addGet('/system/parameter', ['controller'=>'SystemParameter','action'=>'find']) -> setName('BackstageSystemParameter::find');
$routerGroup -> addGet('/system/parameter/([A-Z0-9_]+)', ['controller'=>'SystemParameter','action'=>'findFirstByKey','key'=>1]) -> setName('BackstageSystemParameter::findFirst');
$routerGroup -> addPut('/system/parameter/([A-Z0-9_]+)', ['controller'=>'SystemParameter','action'=>'updateByKey','key'=>1]) -> setName('BackstageSystemParameter::updateByKey');
$routerGroup -> addGet('/system/parameter/ACCOUNT_BACKSTAGE_BANK_INFO', ['controller'=>'SystemParameter','action'=>'findFirstByACCOUNT_BACKSTAGE_BANK_INFO']) -> setName('BackstageSystemParameter::findFirstByACCOUNT_BACKSTAGE_BANK_INFO');
$routerGroup -> addPut('/system/parameter/ACCOUNT_BACKSTAGE_BANK_INFO', ['controller'=>'SystemParameter','action'=>'updateByACCOUNT_BACKSTAGE_BANK_INFO']) -> setName('BackstageSystemParameter::updateByACCOUNT_BACKSTAGE_BANK_INFO');

return $routerGroup;